{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 137,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv(\"./webankdata/vae_result.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(1.9478912)"
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['label'] ==  1]['score'].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(-3.3837943)"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['label'] ==  0]['score'].min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "600"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df[df['label'] ==  0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "419"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df[df['label'] ==  1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 149,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "131"
      ]
     },
     "execution_count": 149,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(df[(df['label'] ==  0) & (abs(df['score']) > 10)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['dfde9203c490c97f52799f895e01ade7',\n",
       " 'c024ac68641d462047574aca967866fe',\n",
       " '90c7fa2828d6a9b918b7ae5c96fc8c54',\n",
       " '37d5d810bf8754f3b1f26409ea2274f9',\n",
       " 'ea75b8bc58986228bffe5874dd3e8cd5',\n",
       " 'a935ceff2bcdf20308fe539a78e2af84',\n",
       " '7bfa73c2ec16cc6b597aeef804f4df3d',\n",
       " '63ae3ef154ec0e01a9e739f94b9e9af9',\n",
       " 'af33147acf3f159a725f2e902e85e5a7',\n",
       " 'b133f2c4d142769f26289ebc37ee1327',\n",
       " '1c02c7bf6bdecbefaf64d99ba0e21140',\n",
       " '22c86acca281e735f21306900d563fa8',\n",
       " 'd8f7b1dfc708d79ad9d4fe1b611db99f',\n",
       " '9028eddd2902227be60d9c941a13ad4c',\n",
       " '81e8d41fa6567f2bdf7dfea5fe1064b0',\n",
       " 'c29bf30f8ef67ff77b9dc4268128e518',\n",
       " '8e1152deba8f912eda8da8bd63361faa',\n",
       " 'c341216058f03694211e1b401e1075ad',\n",
       " 'f1400939a1f782a133e7c4486fe0a50e',\n",
       " '1cd50f3ab641c4ed86f773bfdc9a353e',\n",
       " '464af24bc17ade63a00eb08a5ec867d4',\n",
       " '09fbdb36ce3145049e5d8dcae87cc455',\n",
       " 'bba4bd0c8f86e61ae40aa4e345af69df',\n",
       " '02f85282aa65522c0fe7e3c7bcef4088',\n",
       " 'b2878111fc78cea396f62fcc27642682',\n",
       " '47b7ce63541770223dddeea78ef5eb60',\n",
       " 'e05062864dfa5f58bac5a5099c8201d3',\n",
       " '72070e89ddcc96d82af7cb94ca265518',\n",
       " '7eb5ed2c28dd7656b97d7305aadd904d',\n",
       " '10fc6c8ef9c8dc56a957bab85ef43a95',\n",
       " 'de8834e42f145e106b107b40c9618ea2',\n",
       " 'ea9bab1f92e81c671e817119aa3340fd',\n",
       " 'bfd9380ee8ba8b85259e83935f038f70',\n",
       " 'da193386c164720fe472ab9bac5c3689',\n",
       " '297782ef49255afeb2b08ab8f0c641b6',\n",
       " '4b6a4f5a5457fbc1850468bba4ceb787',\n",
       " '6f6b0f2f84e22ed1d4cc9003a2e1fb50',\n",
       " '0d2fdcf38d5ceb54fdd83715da1a3e57',\n",
       " '2eb40e6467adec5d964af390b26685e3',\n",
       " '861238be6da559ab8d88ed5e70b66bb0',\n",
       " 'd13899ceba519191dc12b4df0b9949d6',\n",
       " 'a802f65289aab9d7768b5ec16b510212',\n",
       " '03a63437d4fdff8510464fd90a48ad68',\n",
       " '92e9515836a42a361d20654f6dd8d57b',\n",
       " '411e743681a5d14b38f17b639185c9ab',\n",
       " 'e34fa40be3bbddc4072288c0659b0c50',\n",
       " 'd60152431f8657f4061df51293813cff',\n",
       " '909ca9a8b5349fac7ed65ceff6a1ae41',\n",
       " '724e1e2376b60b2c3caa3bb05ef4f0ef',\n",
       " '343f2174300a784b1064e8e6a3eac914',\n",
       " '6c62e393c527e2eaf8bb9390f53b12fc',\n",
       " 'baa06cd7be583293a9cc92c707513333',\n",
       " '62a90442dde884a070bc89b9fe968724',\n",
       " '442db737116f13ac03b4040980da6158',\n",
       " 'e891bb4a8739f1236cf17f7d7d2baae9',\n",
       " '364d65929ad11f37c63c9175cafd7ca8',\n",
       " '511820d415393a55aa8177de922d2c17',\n",
       " 'e0d8d6779c7f9460cfef7effefb4ca8e',\n",
       " '9209285571d72eb133e53bc804039695',\n",
       " '3f75cc9c7efb788de1f96ca57e72f10b',\n",
       " '942ff1a0332ca7433fed478742bd5145',\n",
       " '6a8eea0ae09d043a1e0e409e1d7d9476',\n",
       " '21be97a66ab7d3cf5bb5022e4b1c9be8',\n",
       " 'a3fed00b6ce6ddece64e21bd47cab6fa',\n",
       " '92ebb21efd92e32db77bf7838dafbba0',\n",
       " '9f4a35ad1ef54d911aa91fda723e3a8b',\n",
       " 'fd9d3c9e56b092ff5ab55fff8aef1672',\n",
       " '15eda9359743749d1a94724b28def259',\n",
       " 'e30355bfb2839d165e4808e103e67b42',\n",
       " '1aa69faa3c7c20962f6feee53c99736e',\n",
       " '06a97df306cbb95f109426307508ff8d',\n",
       " '11489ad8970fdd6a0165634f6d505289',\n",
       " '0d300c05d0633489446a9df04d6ee231',\n",
       " '0512b256f074471e55f3170a4a790d1b',\n",
       " '1c677174ec951d8933c66917b418aa15',\n",
       " '0f1702a9c16c916663d1ff669652c33f',\n",
       " '9bd5f2a309e7b4ca04e0b040821488b0',\n",
       " '305c50dd8f70607ac62b304d4f8a6d66',\n",
       " '2cb61fc7f3cbd76b92918c78c313cdc3',\n",
       " '6eafefe48925321bb75eae2ede1f411c',\n",
       " 'bfd107ff1a2fc739afa28691550d7567',\n",
       " '93f6d1ce905082549b0396e09fe85015',\n",
       " 'f513a708a2e4b183fde288d4bd0f86e9',\n",
       " '16f15371420356a41fa3f0e3f5cd40bd',\n",
       " 'c7700e19077943741d4febe4d14671fd',\n",
       " 'caaaeb423528b81c793617e8fb123c0d',\n",
       " '16444680edcb31cd2e926ebd8057c4e4',\n",
       " '33dc3748cf9d405ddcf77b3d72e91eab',\n",
       " '559eaa7cf8ac54f8b1a3f536a9d72d41',\n",
       " '69613926f51a0e9284b0cf4a2610d90d',\n",
       " '635403634bee6327df6fc918cf3ea0d5',\n",
       " '7dc95570f05b60df5380a9957ae418a5',\n",
       " '540f6e691caf365e54e88899e9062060',\n",
       " 'a955f60d9eae6e95375cf69c6107be41',\n",
       " '171dc730f31c7f2fdb432db89c0d23ec',\n",
       " '3a0a99b4600734aeaed91cfbbff9af10',\n",
       " '6280f76f2e3162eb6bbe0f1379891702',\n",
       " '7d060ff03170574ce38e604d50ff8269',\n",
       " 'ba4881e6030969a598cd0061cdc4d065',\n",
       " 'e5049df7a0d179c825dbd959506952aa',\n",
       " 'c7a5df0a320e1fac2aeb503fd6199356',\n",
       " '98978dd07a6106da83379b07c83b6f34',\n",
       " '83e141f828790c4a759722b1eb42fd94',\n",
       " 'e973723750d34ba957e7ef2348e83bfc',\n",
       " '76004305f17dc40d63188eca5c0dd0a6',\n",
       " 'a68e44f558d9c5e965ea05212037f6da',\n",
       " '618dce8d67a3bf742508111abb5195a4',\n",
       " '9db870f0bb0d7e87c00d38d2b0c1176a',\n",
       " '34c5f49bf1a72a287f5ae9f2047099f5',\n",
       " '3d7971fe73a8c7f8d2b75a30851da5bd',\n",
       " '8eba07397e14e5c23efcb6d87f233c5c',\n",
       " '55075750c1cca4840f435ad64ba2ad73',\n",
       " 'bfb0cf93e555bffe002df2357a1d9c7f',\n",
       " '962a68a39156b9a46ed5684ff2cba4b6',\n",
       " 'f8185f42c1370b26963d3cfc01d5d628',\n",
       " 'dc1ca5c7285d1bddb6a63dcf63b34824',\n",
       " '5dbcc2e585db57ad9935ee28e14b5987',\n",
       " '7fa4d4194be065b74bce8436bafb6fee',\n",
       " '6af9e27c267ac9a76984341b91a81f91',\n",
       " '8542b8085f979f52dc34b51535e9d12e',\n",
       " 'a8efa11316c738f01071886c69e18bb0',\n",
       " '8835c8b20c3d72990d6b501a47da76d0',\n",
       " '4734aad8a0c7f324c7ccce88129a6981',\n",
       " '249654e51800c05ae0c037654449c59a',\n",
       " '65cad03929b91e39fa19ea596b2fbec3',\n",
       " '592556f0f8518d0455cc29e1e8de09bc',\n",
       " 'f03b38816dfec6cd12e418abb5ff6f26',\n",
       " '2eb712231c0872910470e5168bbf0c58',\n",
       " '7ee989fb2fb5fa066ba137b3aab223fa',\n",
       " 'b520cce74ca53c92856dccbb34027382',\n",
       " '4f933b81a0a999e7d60fbd86ef1df297']"
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(df[(df['label'] ==  1) & (abs(df['score']) > 10)][\"id\"])\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "aiops-tencent",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
